home *** CD-ROM | disk | FTP | other *** search
- #include "objectMgr.h"
-
- EventRecord event; /* event record structure instance */
- EventStuff whatHappened; /* event detail structure instance */
- MenuHandle appleMenu,fileMenu,editMenu;/* handles for standard menus */
-
- main()
- {
- Handle objHandle,result;
- char str[256];
- msgArgs args;
-
- XTendInit(); /* Extender initialization routine */
- StdMenus(&appleMenu,&fileMenu,&editMenu); /* set up standard menus */
-
- objHandle = msg(F_WINDOW,NEW,NULL);
- NumToString(objHandle,str);
- BugAlert("\Pnew: ",str,"\P","\P");
-
- result = msg(WINDOW,INIT,objHandle);
- NumToString(result,str);
- BugAlert("\Pinit: ",str,"\P","\P");
- result = msg(WINDOW,SELF,objHandle);
- NumToString(result,str);
- BugAlert("\Pself: ",str,"\P","\P");
- result = msg(WINDOW,CLASS,objHandle);
- NumToString(result,str);
- BugAlert("\Pclass: ",str,"\P","\P");
- result = msg(WINDOW,SIZE,objHandle);
- NumToString(result,str);
- BugAlert("\Psize: ",str,"\P","\P");
-
- result = msg(WINDOW,ASK_STATUS,objHandle);
- NumToString(result,str);
- BugAlert("\Pask status: ",str,"\P","\P");
- args.objHndl = objHandle;
- args.objDat1 = ACTIVE;
- result = msg(WINDOW,SET_STATUS,&args);
- NumToString(result,str);
- BugAlert("\Pset status: ",str,"\P","\P");
- result = msg(WINDOW,ASK_STATUS,objHandle);
- NumToString(result,str);
- BugAlert("\Pask status: ",str,"\P","\P");
- /* result = msg(WINDOW,FREE,objHandle);
- NumToString(result,str);
- BugAlert("\Pfree: ",str,"\P","\P");*/
-
- result = msg(UNKNOWN,INIT,objHandle);
- NumToString(result,str);
- BugAlert("\Pgeneric init: ",str,"\P","\P");
- result = msg(UNKNOWN,SELF,objHandle);
- NumToString(result,str);
- BugAlert("\Pgeneric self: ",str,"\P","\P");
- result = msg(UNKNOWN,CLASS,objHandle);
- NumToString(result,str);
- BugAlert("\Pgeneric class: ",str,"\P","\P");
- result = msg(UNKNOWN,SIZE,objHandle);
- NumToString(result,str);
- BugAlert("\Pgeneric size: ",str,"\P","\P");
- result = msg(UNKNOWN,ASK_STATUS,objHandle);
- NumToString(result,str);
- BugAlert("\Pask status: ",str,"\P","\P");
- args.objHndl = objHandle;
- args.objDat1 = ACTIVE;
- result = msg(UNKNOWN,SET_STATUS,&args);
- NumToString(result,str);
- BugAlert("\Pset status: ",str,"\P","\P");
- result = msg(UNKNOWN,ASK_STATUS,objHandle);
- NumToString(result,str);
- BugAlert("\Pask status: ",str,"\P","\P");
- result = msg(UNKNOWN,FREE,objHandle);
- NumToString(result,str);
- BugAlert("\Pgeneric free: ",str,"\P","\P");
-
- do { /* repeat until program terminates */
- do { /* repeat until an event occurs */
- SystemTask(); /* allow for DA handling */
- } while (!XTGetNextEvent(everyEvent,&event));
- HandleEvent(&event,&whatHappened); /* get event info */
-
- } while (ExitRequest(&whatHappened) == FALSE);
- }
-